﻿@model ArunimaErp.Domain.postyle

@{
    ViewBag.Title = "Edit";

    Layout = null;
}

<script type="text/javascript">
    $(document).ready(function () {
        $('.dateTimePicker').datepicker({ dateFormat: "dd-M-yy" });
    });
</script>

<div class="module_content">

@using (Ajax.BeginForm("Edit", "Postyle", new AjaxOptions
		{
			InsertionMode = InsertionMode.Replace, 
			HttpMethod = "POST",
            OnSuccess = "poUpdateSuccess"
		}, new { @id = "DialogeForm" }))
	{
    @Html.ValidationSummary(true)
    <div id="po-error-message" class="error invisible"></div>
    
    @Html.HiddenFor(model => model.PoStyleId)

        <div id="left-column">
            
            <fieldset>
		    <div class="editor-field">
			    @Html.LabelFor(model => model.JobId, "Job No")
			    @Html.DropDownList("JobId", string.Empty)
			    @Html.ValidationMessageFor(model => model.JobId)
			
		    </div>
		    </fieldset>
            
            <fieldset>
            <div class="editor-field">
                @Html.LabelFor(model => model.styleinfo.StyleNo, "Style No")
                @Html.DropDownList("StyleId", string.Empty)
                @Html.ValidationMessageFor(model => model.styleinfo.StyleNo)
                @Html.ActionLink("Edit", "Edit", "Style", new { id = Model.StyleId }, new { @class = "styleedit" })
            </div>
            </fieldset>

            <fieldset>
            <div class="editor-field">
                @Html.LabelFor(model => model.PoNo, "Po No")
                @Html.EditorFor(model => model.PoNo)
                @Html.ValidationMessageFor(model => model.PoNo)
            </div>
            </fieldset>

            <fieldset>
            <div class="editor-field">
                @Html.LabelFor(model => model.SeasonId, "season")
                @Html.DropDownList("SeasonId", string.Empty)
                @Html.ValidationMessageFor(model => model.SeasonId)
            </div>
            </fieldset>
            
            <fieldset>
            <div class="editor-field">
                @Html.LabelFor(model => model.FactoryId, "factory")
                @Html.DropDownList("FactoryId", string.Empty)
                @Html.ValidationMessageFor(model => model.FactoryId)
            </div>
            </fieldset>
            
        </div>
        

        <div id="right-column">
            
            <fieldset>
            <div class="editor-field">
                @Html.LabelFor(model => model.Fob, "fob")
                @Html.EditorFor(model => model.Fob)
                @Html.ValidationMessageFor(model => model.Fob)
            </div>
            </fieldset>

            <fieldset>
            <div class="editor-field">
                @Html.LabelFor(model => model.AgreedCm, "Agreed CM")
                @Html.EditorFor(model => model.AgreedCm)
                @Html.ValidationMessageFor(model => model.AgreedCm)
            </div>
            </fieldset>
            
            <fieldset>
            <div class="editor-field">
                @Html.LabelFor(model => model.OrderQuantity, "Order Quantity")
                @Html.EditorFor(model => model.OrderQuantity)
                @Html.ValidationMessageFor(model => model.OrderQuantity)
            </div>
            </fieldset>
            
            <fieldset>
            <div class="editor-field">
                @Html.LabelFor(model => model.ExitDate, "Exit Date")
                @Html.TextBoxFor(model => model.ExitDate, new { @class = "dateTimePicker", @readonly = "readonly" })
                @Html.ValidationMessageFor(model => model.ExitDate)
            </div>
            </fieldset>
        </div>
        
}

</div>
